require('@babel/polyfill');
// import Person2 from './indexb.js';
import Person2 from './indexb.js';

let a = 10;
const b = () => {
  console.log('bbb');

};

let person2 = new Person2();

person2.say();



let arr = [1, 2, 3];

let [x, y, z] = arr;
// es6 结构
console.log(x);
console.log(y);
console.log(z);

let {length,pop,push,forEach,map,toString} = arr; // typeof arr === 'object'

//toString 哪个里面的方法 Object obj.toString

console.dir(toString);

arr.map((item,index)=>{console.log(item,index)});

class Person {
  constructor(name = '小三', age = 20) {
    this.name = name;
    this.age = age;
  }
  sayName() {
    console.log(this.name);
  }

}

let http = require('http');

console.log(http);

arr.reduce((pre, next) => {

});


let person = new Person('小四', 19);

